#include <stdio.h>
#include <string.h>
#include "utils.h"
int ByteArr2Bitstr(int ba,int * bs){
    for (int i=0; i<16; ++i)
        {
            int nTmp = (1 << i);
            bs[15-i] = (( ba & nTmp) == nTmp )? 1 : 0;
        }
}

int Bitstr2ByteArr(int * bs,int ba)
{
    int n=0;
    for (int i=0; i<16; ++i)
    {
        n += bs[15-i] * (1 << i);
    }
    *bs = n;
    return n;
}